aboutsummaryrefslogtreecommitdiff
path: root/src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts')
-rw-r--r--src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts b/src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts
index df4c2cc..bdfa452 100644
--- a/src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts
+++ b/src/routes/projects/[projectId]/routine/[routineId]/+page.server.ts
@@ -26,7 +26,9 @@ export const load: PageServerLoad = async ({ params }) => {
const completions = await loadCompletions(routineId);
// An archived routine is frozen at its archive instant: state and chart
// stop there instead of now.
- const at = routine.archivedAt ? Date.parse(routine.archivedAt) : Date.now();
+ const at = routine.archivedAt
+ ? Temporal.Instant.from(routine.archivedAt)
+ : Temporal.Now.instant();
return {
project: { id: project.id, name: project.name },
routine,